package org.neuedu.chapter05_0618;

import java.util.Arrays;

public class Practice04 {
    public static void main(String[] args) {
        int[] arr = {5, 2, 6, 3, 5, 87, 9, 9, 90};
        test(arr);
        System.out.println(Arrays.toString(arr));
    }
    public static void test(int[] num) {
        for (int i = 1; i < num.length; i++) {
            for (int j = 0; j < num.length - i; j++) {
                if (num[j] > num[j + 1]) {
                    int temp = num[j];
                    num[j] = num[j + 1];
                    num[j + 1] = temp;
                }
            }
        }
    }
}
